﻿@using OA.Models

@(
    Html.Kendo().Grid<调班申请单>()
    .Name("grid")
    .HtmlAttributes(new { style = "height:99%" })
    .Columns(columns =>
    {
        columns.Bound(d => d.Id).Width(230);
        columns.Bound(d => d.Applicant).Width(150);

        columns.Bound(d => d.原上班时间).Width(150);
        columns.Bound(d => d.调至上班时间).Width(200);
        columns.Bound(d => d.调班理由).Width(200);

        columns.Bound(d => d.Status).Width(110);
        columns.Command(d => d.Custom("查看详情").Click("Detail"));
    })
    .Pageable()
    .Sortable()
    .Scrollable()
    .Filterable()
    .Selectable(selectable => selectable.Mode(GridSelectionMode.Single))
    .DataSource(dataSource => dataSource
        .Ajax()
        .PageSize(10)
        .Model(model =>
        {
            model.Id(p => p.Id);
        })
        .Read(read => read.Action("Read", "ApplicationForm", new { typeName = "调班申请单" }))
    )
)

<script>
    function Detail() {

    }
</script>